POV-Ray : Newsgroups : povray.programming : sphere memory : sphere memory Server Time
28 Jul 2024 08:25:34 EDT (-0400)
  sphere memory  
From: Niki Estner
Date: 28 Aug 2002 04:51:44
Message: <3d6c8f20@news.povray.org>
Hi there,

For the images I am making I need lots of tiny, simple objects: grass, hair,
particle systems can be simulated with these.
Unfortunately, if I have 500,000 spheres or more, main memory seams to be
completely full, and PovRay is constantly swapping during the render (and it
takes about 30 min to get to the first pixel - I didn't even wait for the
second). I got 256 mb of main memory, and I think 500,000 spheres should fit
in there. (of course there are other objects too in the scene, but then,
what's a sphere in bytes?)
I tried to use triangle meshes: these do use less memory, but they take much
longer to render, which is, essentially, the point.
Anyway my idea was to make something like a "sphere mesh": a thing that does
the same as a union of spheres, but with less memory used. I think I need
only 12*8 bytes per sphere (transformation matrix plus translation vector).
My question is: Do you think this is a good idea? If yes, why hasn't anyone
done it before? If not, well, why not?
Has anybody tried anything similar? Any advices? I would just have analyzed
what a union of spheres does (maybe with the debugger) and tried to do the
same with a different memory layout, and without virtual functions...

Niki


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.